import urllib2
import cStringIO

class XMLFetcher(object):
    '''
    classdocs
    '''
    
    def __init__(self):
        '''Constructor'''
    
    def fetch_xml(self, url):
        try:
            xml_stream = urllib2.urlopen(url).read()
            stream = cStringIO.StringIO(xml_stream)
            return stream
        except urllib2.URLError:
            print("Error in fetching XML")
        except ValueError:
            print("Unknown url")